package com.ruicar.afs.cloud.easypass.process.feign;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.common.core.feign.annotations.AfsFeignClear;
import com.ruicar.afs.cloud.easypass.process.dto.ApplySigningInfoDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Description: 银行签约丶短信接口
 * @Author: huangtao
 * @Date: 2020/8/11
 */
@FeignClient(name = "contract-signing-feign", url = "${com.greatwall.systems.easypass.url}")
public interface ContractSigningFeign {
    /**
     * @Description: 四要素验证
     * @Param: [signingInfoDTO]
     * @return: com.alibaba.fastjson.JSONObject
     * @Author: huangtao
     * @Date: 2020/8/11
     */
    @PostMapping(value = "/pay/verify", consumes = MediaType.APPLICATION_JSON_VALUE)
    @AfsFeignClear(true)
    JSONObject doVerify(@RequestBody ApplySigningInfoDTO signingInfoDTO);

    /**
     * @Description: 短信验证
     * @Param: [signingInfoDTO]
     * @return: com.alibaba.fastjson.JSONObject
     * @Author: huangtao
     * @Date: 2020/8/11
     */
    @PostMapping(value = "/pay/sign")
    @AfsFeignClear(true)
    JSONObject doSign(@RequestBody ApplySigningInfoDTO signingInfoDTO);
}
